var express = require('express');
// var { expressjwt } = require('express-jwt')
var app = express();
app.use(express.static('stv'));
app.use( express.json() );
app.use( express.urlencoded({extended:false}) );

// app.use( expressjwt({
//     secret: '1234' ,//密钥
//     algorithms: ['HS256'], //算法
// }).unless( { path:['/user/login','/user/zhuce'] } ) );

var userRouter = require('./router/userRouter')
// var goodRouter = require('./router/goodRouter')

app.use( '/user' , userRouter )
// app.use( '/good' , goodRouter )



app.listen(8080, () => {
    console.log('服务端运行在: http://localhost:8080');
})